<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Revisión</title>
      <link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
   </head>

   <body>
      <div id="container">
         <div id="header">
            <div id="headerLeft">
               <h1><span style="color:#599EC8;">EXAMENES</span><br/>&nbsp;&nbsp;&nbsp;&nbsp;WEB</h1>
            </div>
                   
            <form id="formSalir" name="formSalir" method="post" action="Control" class="formulario">
               <div id="pass" align="right">
                  <a href="cambiaPassw.jsp" target="_new"><strong><font color="#000000">Cambiar contraseña</font></strong></a>
                  <input type="hidden" name="opcion" value="logout">
                  <input type="submit" name="logout" value="Logout"/>
               </div>       
            </form>
         </div>
      </div><br/>
      
      <c:if test="${usuActivo.nombre == null || usuActivo.tipoS != 'P'}">
         <div align=center>
            <strong><font color="#993300">Usted no se ha logueado apropiadamente.</font></strong><br/>
            <a>&nbsp;</a>
         </div>
      </c:if>  

      <c:if test="${usuActivo.nombre != null && usuActivo.tipoS == 'P'}">
          
          <div id="menu">
              <ul>
                  <form id="formBoton" name="formBoton" method="post" action="Control" class="formulario">
                      <input type="hidden" name="opcion" value="homeProf">
                      <input type="hidden" name="idProfesor" value="${usuActivo.idUsu}">
                      <input type="submit" name="cargar" value="Home" class="boton">
                  </form>
                  <li><a href="listadoMaterias.jsp">Materias</a></li>
                  <form id="formBoton" name="formBoton" method="post" action="Control" class="formulario">
                      <input type="hidden" name="opcion" value="camFecRevision">
                      <input type="hidden" name="idProfesor" value="${usuActivo.idUsu}">
                      <input type="submit" name="cargar" value="Revisiones" class="boton">
                  </form>
              </ul>
          </div>
          
          <c:if test="${param.msg == 'REGINCOM'}">
              <div align=center>
                  <strong><font color="#993300">Debe completar todos los campos requeridos.</font></strong><br/>
                  <a>&nbsp;</a>
              </div>
          </c:if>
          
          <c:if test="${param.msg == 'FAILCARG'}">
              <div align=center>
                  <strong><font color="#993300">Fallo la carga.</font></strong><br/>
                  <a>&nbsp;</a>
              </div>
          </c:if> 
          
          <h1 id="title">Revisión para ${param.nomMateria}</h1><br/>
          
          <table width="50%" border=0 cellspacing=0 align="center">
              <tr>
                  <td width="40%"><div align="center"><strong>Apellidos</strong></div></td>
                  <td width="40%"><div align="center"><strong>Nombres</strong></div></td>
                  <td width="20%"><div align="center"><strong>Puntaje</strong></div></td>
              </tr>
              <c:forEach var="alumnos" items="${alumRev}">
                  <tr>
                      <td width="40%"><c:out value="${alumnos.columna2}"/></td>
                      <td width="40%"><c:out value="${alumnos.columna1}"/></td>
                      <td width="20%"><div align="center"><c:out value="${alumnos.columna3}"/></div></td>
                  </tr>       
              </c:forEach>
              <tr>
                  <td width="40%">&nbsp;</td>
                  <td width="40%">&nbsp;</td>
                  <td width="20%">&nbsp;</td>
              </tr>
              <tr>
                  <td width="40%">&nbsp;</td>
                  <td width="40%"><div align="center"><input type="button" name="imprimir" value="Imprimir" onclick="window.print();"></div></td>
                  <td width="20%">&nbsp;</td>
              </tr>
          </table><br/>
      </c:if>
   </body>
</html>
